<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<style>
   #userId{
   	  margin-right: 20px;
       line-height: 42px;
       cursor: pointer;
       padding: 36px 0;
   }
   #userId img{
   		margin-left: 10px;
   }
   #userId:hover .grszDailog{
   	display:block;
   }
</style>
<div id="head">
	<div id="imgdiv">
		<img src="static/img/logo.jpg" alt="" id="logo">
	</div>
	<div class="head-two">
	
		<div class="head-num2">3419203179</div>
		<div class="head-num">400-0536-191</br>0536-3208288</div>
		<div id="userId"  idNum="${idNum}" uid="${userId}" readlName="${realName}" email="${email}"  username="${userName}"  style="display:none"><span id="uName">${userName}</span><img src="static/img/szxx.png">	<!-- 个人设置弹框 -->
<div class="grszDailog">
	<div class="setDiv" id="gesz">
		<img src="static/img/set-grsz.png">个人设置
	</div>
	<div class="setDiv" id="tcdl">
		<img src="static/img/set-tcdl.png">退出登录
	</div>
	<div class="setDiv" id="zxzh">
		<img src="static/img/set-zxzh.png">注销账户
	</div>
</div></div>
		<span class="head-span login"><a href="login.html">登录</a></span>
		<span class="head-span shu">丨</span>
		<span class="head-span reg"><a href="reg.html">注册</a></span>
	</div>

</div>
<script>

    $(function(){
       if($("#uName").text()!==""){
          $(".head-span").css("display","none");
          $("#userId").css("display","inline");
       }

	
	$(".grszDailog").hover(function(){
		$(".grszDailog").addClass("showstDiv");
	},function(){
		$(".grszDailog").removeClass("showstDiv");
	})
	
	$("#gesz").click(function(){
		window.location.href="grsz.html";
	})
	$("#zxzh").click(function(){
		window.location.href="zxzh.html";
	})
		$("#tcdl").click(function(){
			$("#userId").attr("idNum","");
			$("#userId").attr("readlName","");
			$("#userId").attr("email","");
			$("#userId").attr("username","");
			$("#userId").attr("customerNo","");
			$("#uName").text();
			$.ajax({
		      url:"front/user/logout.do",
		      type:"GET",
		      dataType:"json",
		      success:function (json) {
		          if (json.code == 0){
		          	window.localStorage.customerNo = "";
		            window.location.href="qzsmk.html";
		          }else if (json.code ==1){
		             alert(json.message);
		          }
		      }
		    });
	})
	

    })
</script>